package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 购物车对象 tb_shopping_cart
 * 
 * @author ruoyi
 * @date 2025-03-30
 */
public class CwShoppingCart extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** + */

    private Long cartId;

    /** 用户 ID */
    @Excel(name = "用户 ID")
    private Long userId;

    /** 商品 ID */
    @Excel(name = "商品 ID")
    private Long productId;

    /** 商品数量 */
    @Excel(name = "商品数量")
    private Long productQuantity;

    /** 添加时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "添加时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date addTime;

    private Integer count;

    // Getter 方法
    public Integer getCount() {
        return count;
    }

    // Setter 方法
    public void setCount(Integer count) {
        this.count = count;
    }

    public void setCartId(Long cartId) 
    {
        this.cartId = cartId;
    }

    public Long getCartId() 
    {
        return cartId;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }
    public void setProductQuantity(Long productQuantity) 
    {
        this.productQuantity = productQuantity;
    }

    public Long getProductQuantity() 
    {
        return productQuantity;
    }
    public void setAddTime(Date addTime) 
    {
        this.addTime = addTime;
    }

    public Date getAddTime() 
    {
        return addTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("cartId", getCartId())
            .append("userId", getUserId())
            .append("productId", getProductId())
            .append("productQuantity", getProductQuantity())
            .append("addTime", getAddTime())
            .toString();
    }
}
